package com.prodog.commonmodule.prop.caculate.handler;

import com.prodog.commonmodule.prop.entity.ObjCaculaterProp;
import com.prodog.commonmodule.prop.entity.ObjProp;
import com.prodog.gamemodule.gameworld.monster.entity.MonsterProp;
import com.prodog.utils.bean.BeanUtil;
import com.prodog.utils.interfaces.AutowiredBean;

public class MonsterPropHandler implements AutowiredBean, ObjPropHandler<MonsterProp> {
    public MonsterPropHandler() {
        autowired();
    }


    @Override
    public ObjProp handle(MonsterProp prop) {
        ObjCaculaterProp caculaterProp = new ObjCaculaterProp() {{
            setAbsoluteProp(prop);
            setResultProp(BeanUtil.beanToBean(prop, MonsterProp.class));
        }};
        //执行多个计算方式....
        return caculaterProp.getResultProp();
    }
}
